'use strict';{let m=function(a,b){return a.concat(u(b,a))},u=function(a,b){return a.filter(c=>0>_xr(b,c))},n=function(a,b){return a.filter(c=>0<=_xr(b,c))},p=function(a){let b=a.find(c=>!c.menuId);b&&(a=[b]);return a};const v={[_Cd]:_ou,[_Ea]:_ou,[_ip]:_ou,[_ho]:_Ea,[_ew]:_Ea,[_vh]:_Ea,[_Ni]:_vh,[_Ua]:_Ni,[_Yw]:_Ni,[_Tw]:_Ni,[_Os]:_Ni,[_Ue]:_ip,[_lr]:_ip,[_kh]:_ip,[_Wp]:_ip,[_3s]:_ip,[_ot]:_ip,[_6g]:_fg,[_Wi]:_fg,[_8t]:_fg,[_Dj]:_fg,[_5o]:_fg,[_ur]:_fg,[_ys]:_fg,[_5t]:_fg,[_yo]:_fg};let h=function(a,
b){for(;a;a=v[a])if(a==b)return!0},k=function(a){let b={};for(let c=0;c<a.length;++c)for(let d=0;d<a.length;++d)c!=d&&!b[d]&&h(a[c].region,a[d].region)&&(b[c]=!0);return a.filter((c,d)=>!b[d])},w=function(a,b){return h(a,b)?a:h(b,a)?b:void 0},x=function(a,b){let c,d;for(let e of a){a=b[e.swtchId]==e.state;switch(d){case "&":c=c&&a;break;case "|":c=c||a;break;case "=":c=c==a;break;default:c=a}d=e.oper}return c},q=function(a){let b=Object.keys(a.reduce((e,f)=>(e[f.swtchId]=!0,e),{})).sort(),c=Math.pow(2,
b.length),d=[];for(let e=0;e<c;++e){let f=[...e.toString(2)].map(g=>+g).reverse(),l=b.reduce((g,y,z)=>(g[y]=!!f[z],g),{});d[e]=x(a,l)}return{swtchIds:b,results:d}},r=function(a,b){return a.length==b.length?a.every((c,d)=>c==b[d]):!1},A=function*(a){let b=function*(c,d,e){for(;c<a.length;++c){let f=[...d,a[c]];f.length==e?yield f:yield*b(c+1,f,e)}};for(let c=1;c<=a.length;++c)yield*b(0,[],c)},B=function(a,b){return r(a.swtchIds,b.swtchIds)},t=function(a){let b=[];for(let c of a)for(let d=0;d<c.results.length;++d)b[d]=
b[d]||c.results[d];return{swtchIds:a[0].swtchIds,results:b}},C=function(a){let b=[];for(let c of a)c[c.length-1].oper="O",b.push(...c);return b};const D={urlTests:{[0]:a=>a.negate,[1]:m,[2]:n},menuState:{[0]:a=>a.negate,[1]:function(a,b){return p(m(a,b))},[2]:function(a,b){return p(n(a,b))}},mouseOver:{[0]:a=>"not"==a.oper,[1]:function(a,b){return k(a.concat(b))},[2]:function(a,b){a=k(a);b=k(b);let c=[];for(let d of a)for(let e of b)a=w(d.region,e.region),a==d.region?c.push(d):a==e.region&&c.push(e);
return c}},swtchState:{[0]:()=>!1,[1]:function(a,b){b=b.filter(d=>d.swtchId);if(b.length){let d=q(b);var c=a.map(q).filter(e=>B(e,d));for(let e of A(c)){c=t(e);if(r(c.results,d.results))return a;if(t([c,d]).results.every(f=>f))return null}a.push(b)}return a},[2]:()=>[]}};var _fk=function(a,b,c,d){const e=D[a];if(null!==b[a]){let f=(d[a]||[]).filter(l=>!e[0](l));b[a]=f.length?e[1](_ih(b,a,[]),f):null}if(!c[a]||c[a].length)b=(d[a]||[]).filter(e[0]),c[a]=c[a]?e[2](c[a],b):b},_wp=function(a){const [b,
c]=a;for(let d of["urlTests","menuState","mouseOver"])b[d]=(b[d]||[]).concat(c[d]||[]);b.swtchState&&(b.swtchState=C(b.swtchState));return b}};
